package com.battery.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.battery.common.annotation.Excel;
import com.battery.common.core.domain.BaseEntity;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 租借依据对象 ws_used_basics
 *
 * @author battery
 * @date 2021-01-22
 */
@Table(name = "ws_used_basics")
public class UsedBasics {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String usedId;

    /**
     * 租借时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "租借时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date rentDate;

    /**
     * 归还时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date backDate;

    /**
     * 是否归还 0 未归还 1 归还
     */
    @Excel(name = "是否归还 0 未归还 1 归还")
    private Integer isBack;

    /**
     * 借出机柜ID
     */
    @Excel(name = "借出机柜ID")
    private String rentDeviceId;

    /**
     * 借出设备编码
     */
    @Excel(name = "借出设备编码")
    private String rentDeviceSn;

    /**
     * 借出的设备槽位
     */
    @Excel(name = "借出的设备槽位")
    private Integer rentSlotNo;

    /**
     * 归还设备id
     */
    @Excel(name = "归还设备id")
    private String backDeviceId;

    /**
     * 归还设备sn
     */
    @Excel(name = "归还设备sn")
    private String backDeviceSn;

    /**
     * 归还的设备槽位
     */
    @Excel(name = "归还的设备槽位")
    private Integer backSlotNo;

    private String leaseId;


    private String batterySn;


    private String devType; // 设备类型


    public String getBatterySn() {
        return batterySn;
    }

    public void setBatterySn(String batterySn) {
        this.batterySn = batterySn;
    }

    public void setUsedId(String usedId) {
        this.usedId = usedId;
    }

    public String getUsedId() {
        return usedId;
    }

    public void setRentDate(Date rentDate) {
        this.rentDate = rentDate;
    }

    public Date getRentDate() {
        return rentDate;
    }

    public void setBackDate(Date backDate) {
        this.backDate = backDate;
    }

    public Date getBackDate() {
        return backDate;
    }

    public void setIsBack(Integer isBack) {
        this.isBack = isBack;
    }

    public Integer getIsBack() {
        return isBack;
    }

    public void setRentDeviceId(String rentDeviceId) {
        this.rentDeviceId = rentDeviceId;
    }

    public String getRentDeviceId() {
        return rentDeviceId;
    }

    public void setRentDeviceSn(String rentDeviceSn) {
        this.rentDeviceSn = rentDeviceSn;
    }

    public String getRentDeviceSn() {
        return rentDeviceSn;
    }

    public void setRentSlotNo(Integer rentSlotNo) {
        this.rentSlotNo = rentSlotNo;
    }

    public Integer getRentSlotNo() {
        return rentSlotNo;
    }

    public void setBackDeviceId(String backDeviceId) {
        this.backDeviceId = backDeviceId;
    }

    public String getBackDeviceId() {
        return backDeviceId;
    }

    public void setBackDeviceSn(String backDeviceSn) {
        this.backDeviceSn = backDeviceSn;
    }

    public String getBackDeviceSn() {
        return backDeviceSn;
    }

    public void setBackSlotNo(Integer backSlotNo) {
        this.backSlotNo = backSlotNo;
    }

    public Integer getBackSlotNo() {
        return backSlotNo;
    }

    public String getLeaseId() {
        return leaseId;
    }

    public void setLeaseId(String leaseId) {
        this.leaseId = leaseId;
    }


    public String getDevType() {
        return devType;
    }

    public void setDevType(String devType) {
        this.devType = devType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("usedId", getUsedId())
                .append("rentDate", getRentDate())
                .append("backDate", getBackDate())
                .append("isBack", getIsBack())
                .append("rentDeviceId", getRentDeviceId())
                .append("rentDeviceSn", getRentDeviceSn())
                .append("rentSlotNo", getRentSlotNo())
                .append("backDeviceId", getBackDeviceId())
                .append("backDeviceSn", getBackDeviceSn())
                .append("backSlotNo", getBackSlotNo())
                .toString();
    }
}
